/**
 * 时间轴增加
 */

  function TimelineCreateCommand(dataProvider, timeline, widget_id, root){
      this.dataProvider = dataProvider;
      this.timeline = timeline;
      this.widgetId = widget_id;
      this.root = root;
  };
  TimelineCreateCommand.prototype = {
      execute: function (){

      },
      undo: function (){
          // 执行删除时间轴操作
          this.dataProvider.removeTimeline(this.widgetId, this.timeline, function (){
              this.root.updateSelectedTimeline(null);
          }.bind(this), function (){}, this.root, true);
      },
      redo: function (){
          // 执行增加时间轴操作
          this.dataProvider.saveTimelineAnimation(this.widgetId, this.timeline, function (){
              this.root.updateSelectedTimeline(this.timeline);
          }.bind(this), function (){}, this.root, true);
      },
  };

  module.exports = TimelineCreateCommand;
